:root {
  --font-base: clamp(0.5rem, 2.5vw, 1.5rem);
  --font-heading: clamp(1.5rem, 4vw, 2rem);
}

#installDialog{

  position: fixed;
  top: 6%;
  left: 50%;
  transform: translate(-50%, 0);

  /* width: 800px; */

  font-family: 'Segoe UI', sans-serif;
  font-size: var(--font-base);

  margin: 0;
  padding: 2rem;
  border-radius: 14px;
  
  background: #f9f9f9;
  color: #333;
}

#installDialog::backdrop{
  background-color: black;
  opacity: 0.8;
}

.dialog-title {
  font-size: var(--font-heading);
  /* font-size: 2rem; */
  text-align: center;
  margin-bottom: 1rem;
}

.device-title {
  color: #2c3e50;
  font-size: calc(var(--font-base) + 0.2rem);
}

.toggle-section {
  text-align: center;
  margin-bottom: 2rem;
}

.toggle-label {
  font-weight: bold;
  margin-bottom: 0.5rem;
  display: block;
  font-size: var(--font-base);
}

.toggle-wrapper {
  display: flex;
  position: relative;
  background: #eee;
  border-radius: 999px;
  overflow: hidden;
  max-width: 600px;
  margin: auto;
  box-shadow: inset 0 0 0 1px #ccc;
}

.toggle-option {
  flex: 1;
  text-align: center;
  padding: 1rem;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: var(--font-base);
}

.toggle-option .material-icons {
  font-size: 1.2em;
}

.toggle-option.active {
  font-weight: bold;
  color: #fff;
}

.toggle-highlight {
  position: absolute;
  top: 0;
  left: 0;
  width: 33.3333%;
  height: 100%;
  background: #3498db;
  transition: transform 0.3s ease;
  z-index: 0;
  border-radius: 999px;
}

.instructions {
  max-width: 700px;
  margin: auto;
  background: #fff;
  border-radius: 12px;
  padding: 0.5em 1.0em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  animation: fadeIn 0.4s ease-in-out;
}

.instructions h3 {
  margin-bottom: 1rem;
}

.instructions ol {
  text-align: left;
  padding-left: 1.2rem;
}

.instructions li {
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

.install-prompt-section {
  max-width: 700px;
  margin: 1rem auto 1.25rem;
  text-align: center;
}

.install-now-button {
  font-size: var(--font-base);
  padding: 0.6rem 1.3rem;
  border-radius: 6px;
  border: none;
  background: #27ae60;
  color: #fff;
  cursor: pointer;
  transition: background 0.25s ease;
}

.install-now-button:hover {
  background: #1d8c4c;
}

.install-prompt-message {
  margin: 0.75rem auto 0;
  max-width: 520px;
  color: #2c3e50;
  line-height: 1.4;
}

.note {
  font-size: 1.25rem;
  
  
  color: #856404;
  background-color: #fff3cd;
 
  padding: 1rem;
  margin: 1rem 0rem;
  border: 1px solid #ffeeba;
  border-radius: 8px;
  
}

.icon-inline {
  vertical-align: middle;
  height: 1.2em;
  /* margin-left: 0.3em; */
}

.qr-section {
  display: none;
  text-align: center;
  margin-top: 2rem;
}

.qr-section img {
  max-width: 200px;
  margin-top: 1rem;
}

.copy-url {
  display: none;
  justify-content: center;
  margin-top: 1rem;
}

.copy-url button {
  font-size: var(--font-base);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: none;
  background: #3498db;
  color: white;
  cursor: pointer;
  transition: background 0.3s ease;
}

.copy-url button:hover {
  background: #217dbb;
}

.hidden {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1200px) and (min-width: 601px) {
  .dialog-title {
    font-size: clamp(1.45rem, 1.05rem + 1.05vw, 2rem);
    line-height: 1.25;
  }

  .instructions h3 {
    font-size: clamp(1.05rem, 0.9rem + 0.45vw, 1.3rem);
    line-height: 1.3;
  }

  .instructions li {
    font-size: clamp(0.98rem, 0.86rem + 0.35vw, 1.15rem);
    line-height: 1.5;
  }
}

/* @media (max-width: 600px) {
  body {
    padding: 1rem;
  }

  #installDialog {
    width: min(94vw, 620px);
    max-height: 92vh;
    overflow-y: auto;
    padding: 1.25rem;
  }

  .qr-section img {
    max-width: 150px;
  }
} */

@media (max-width: 600px) {
  #installDialog {
    top: 4%;
    width: 96vw;
    max-height: 94vh;
    padding: 0.9rem;
    border-radius: 10px;
  }

  .dialog-title {
    font-size: 1.2rem;
    margin-bottom: 0.65rem;
    line-height: 1.25;
  }

  .toggle-section {
    margin-bottom: 1rem;
  }

  .toggle-label {
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
  }

  .toggle-wrapper {
    width: 100%;
  }

  .toggle-option {
    padding: 0.6rem 0.25rem;
    gap: 0.2rem;
    font-size: clamp(0.82rem, 0.49rem + 1.45vw, 1.02rem);
    flex-direction: column;
    line-height: 1.1;
  }

  .toggle-option .material-icons {
    font-size: 1rem;
  }

  .instructions {
    padding: 0.6rem 0.7rem;
    border-radius: 10px;
  }

  .instructions h3 {
    margin: 0.35rem 0 0.7rem;
    font-size: 1rem;
    line-height: 1.25;
  }

  .instructions ol {
    padding-left: 1rem;
  }

  .instructions li {
    margin-bottom: 0.7rem;
    line-height: 1.35;
    font-size: clamp(0.88rem, 0.53rem + 1.4vw, 1.05rem);
  }

  .note {
    font-size: 0.95rem;
    padding: 0.7rem;
    margin: 0.7rem 0;
  }

  .install-now-button,
  .copy-url button {
    width: 100%;
    max-width: 320px;
    font-size: 0.95rem;
  }

  .qr-section {
    margin-top: 1.2rem;
  }

  .qr-section h3 {
    margin-bottom: 0.35rem;
  }

  .qr-section p {
    margin: 0;
    font-size: 0.9rem;
  }

  .qr-section img {
    margin-top: 0.6rem;
    max-width: 120px;
  }
}

@media (max-width: 400px) {
  .toggle-option {
    font-size: 0.8rem;
  }

  .toggle-option .material-icons {
    font-size: 0.95rem;
  }

  .instructions li {
    font-size: 0.85rem;
  }
}